import service from "@/service/http.interceptor";

/**
 * 获取微信openId
 */
export const getOpenId = (code) => {
	return service.request({
		method: 'get',
		url: '/shop_user/user/c/wechatAuthorize/' + code,
		custom: {
			loading: true
		}
	})
}

/**
 * 获取微信openId
 */
export const sendMq = () => {
	return service.request({
		method: 'get',
		url: '/shop_order/order/sendMq',
		custom: {
			loading: true
		}
	})
}

/**
 * 更新用户昵称
 */
export const updateUserNickName = (data) => {
	return service.request({
		method: 'post',
		url: '/shop_user/user/c/updateUserNickName',
		data,
		custom: {
			loading: true
		}
	})
}

/**
 * 更新用户头像
 */
export const updateUserAvatar = (data) => {
	return service.request({
		method: 'post',
		url: '/shop_user/user/c/updateUserAvatar',
		data,
		custom: {
			loading: true
		}
	})
}

/**
 * 内部用户登录
 */
export const userInnerLogin = (data) => {
	return service.request({
		method: 'post',
		url: '/shop_user/user/inner/c/login',
		data,
		custom: {
			loading: true
		}
	})
}